import request from '@/request/index.js';

export function getProductListRecommend(params) {
	return request.get({
		url: '/app-api/mall/product/list-recommend',
		params: params || {},
		custom: {
			title: "获取首页商品推荐",
			authentication: true
		}
	});
}

export function getProductClassify(params) {
	return request.get({
		url: '/app-api/mall/product/classify',
		params: params || {},
		custom: {
			title: "获取商城商品分类",
			authentication: true
		}
	});
}

export function getProductDetails(params) {
	return request.get({
		url: '/app-api/mall/product/detail',
		params: params || {},
		custom: {
			title: "获取商城商品列表",
			authentication: true
		}
	});
}

export function getProductList(params) {
	return request.get({
		url: '/app-api/mall/product/list-page',
		params: params || {},
		custom: {
			title: "获取商城商品列表",
			authentication: true
		}
	});
}

export function addMyCartProduct(params) {
	return request.post({
		url: '/app-api/mall/cart/add-cart',
		params: params || {},
		custom: {
			title: "添加购物车商品",
			authentication: true
		}
	});
}

export function removeMyCartProduct(params) {
	return request.post({
		url: '/app-api/mall/cart/remove-cart-product',
		params: params || {},
		custom: {
			title: "删除购物车商品",
			authentication: true
		}
	});
}

export function changeMyCartProductNumber(params) {
	return request.post({
		url: '/app-api/mall/cart/upate-cart-product-num',
		params: params || {},
		custom: {
			title: "修改购物车商品数量",
			authentication: true
		}
	});
}

export function checkedMyCartProduct(data) {
	return request.post({
		url: '/app-api/mall/cart/checked-cart-product',
		data: data || {},
		custom: {
			title: "设置购物车商品选中",
			authentication: true
		}
	});
}

export function getMyCartProductList(params) {
	return request.get({
		url: '/app-api/mall/cart/get-my-cart',
		params: params || {},
		custom: {
			title: "获取购物车商品列表",
			authentication: true
		}
	});
}

export function getMyCartProductNumber(params) {
	return request.get({
		url: '/app-api/mall/cart/get-cart-product-num',
		params: params || {},
		custom: {
			title: "统计购物车商品数量",
			authentication: true
		}
	});
}

export function submitProductEvaluate(data) {
	return request.post({
		url: '/app-api/mall/product-comment/create',
		data: data || {},
		custom: {
			title: "商品评论",
			authentication: true
		}
	});
}

export function getProductEvaluateCount(data) {
	return request.get({
		url: '/app-api/mall/product/comment-count',
		data: data || {},
		custom: {
			title: "获取商品评论统计",
			authentication: true
		}
	});
}

export function getProductEvaluateTypes(params) {
	return request.get({
		url: '/app-api/mall/product-comment/tagsAndCount',
		params: params || {},
		custom: {
			title: "获取商品评论标签",
			authentication: true
		}
	});
}

export function getProductEvaluateList(params) {
	return request.get({
		url: '/app-api/mall/product-comment/page',
		params: params || {},
		custom: {
			title: "获取商品评论列表",
			authentication: true
		}
	});
}

export function getMyProductEvaluateList(params) {
	return request.get({
		url: '/app-api/mall/product-comment/my-comment-page',
		params: params || {},
		custom: {
			title: "获取我的商品评论列表",
			authentication: true
		}
	});
}

export function submitProductCollect(params) {
	return request.post({
		url: '/app-api/mall/product-collection/collection',
		params: params || {},
		custom: {
			title: "商品收藏/取消收藏",
			authentication: true
		}
	});
}

export function getProductCollectList(params) {
	return request.get({
		url: '/app-api/mall/product-collection/list-page',
		params: params || {},
		custom: {
			title: "获取商品收藏列表",
			authentication: true
		}
	});
}

export function submitProductOrder(data) {
	return request.post({
		url: '/app-api/mall/order/create-mall-order',
		data: data || {},
		custom: {
			title: "提交商品订单",
			authentication: true
		}
	});
}

export function cancelProductOrder(params) {
	return request.post({
		url: '/app-api/mall/order/cancel-mall-order',
		params: params || {},
		custom: {
			title: "取消商品订单",
			authentication: true
		}
	});
}

export function payProductOrder(params) {
	return request.post({
		url: '/app-api/mall/order/wait-pay',
		params: params || {},
		custom: {
			title: "支付商品订单",
			authentication: true
		}
	});
}

export function changeProductOrderAddress(params) {
	return request.post({
		url: '/app-api/mall/order/alter-mall-order-address',
		params: params || {},
		custom: {
			title: "修改商品订单地址",
			authentication: true
		}
	});
}

export function getProductOrderDetails(params) {
	return request.get({
		url: '/app-api/mall/order/detail',
		params: params || {},
		custom: {
			title: "获取商品订单详情",
			authentication: true
		}
	});
}

export function getProductOrderList(params) {
	return request.get({
		url: '/app-api/mall/order/order-mall-list',
		params: params || {},
		custom: {
			title: "获取商品订单列表",
			authentication: true
		}
	});
}

export function getMallLogisticsInfo(params) {
	return request.get({
		url: '/app-api/mall/order/query-routes',
		params: params || {},
		custom: {
			title: "获取商品订单物流信息",
			authentication: true
		}
	});
}

export function confirmProductOrderReceive(params) {
	return request.post({
		url: '/app-api/mall/order/confirm-receive',
		params: params || {},
		custom: {
			title: "确认收货",
			authentication: true
		}
	});
}

export function applyProductRefund(data) {
	return request.post({
		url: '/app-api/mall/order/apply-after-sale',
		data: data || {},
		custom: {
			title: "订单申请退款",
			authentication: true
		}
	});
}

export function cancelApplyProductRefund(params) {
	return request.post({
		url: '/app-api/mall/order/cancel-after-sale',
		params: params || {},
		custom: {
			title: "订单取消售后",
			authentication: true
		}
	});
}

export function complementApplyProductRefund(data) {
	return request.post({
		url: '/app-api/mall/order/submit-after-sale',
		data: data || {},
		custom: {
			title: "订单售后补充信息",
			authentication: true
		}
	});
}

export function getProductOrderCount() {
	return request.get({
		url: '/app-api/mall/order/statistics',
		params: {},
		custom: {
			title: "个人中心订单统计",
			authentication: true
		}
	});
}
export function getNurseOrderCount() {
	return request.get({
		url: '/app-api/collaboration/nurse/get-nurse-amount',
		params: {},
		custom: {
			title: "护理订单统计",
			authentication: true
		}
	});
}